<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function Star(name,age){
            this.name=name
            this.age=age 
        }

        Star.prototype={
            constructor:Star,//千万不要把constructor 丢了
            sing:function(){
                console.log('唱歌');
            },
            eat:function(){
                console.log('嗨皮');
            }
        }

        let ldh=new Star('ldh',10)
        let zxy=new Star('zxy',20)

        console.dir(Star)

        console.log(ldh.__proto__);
        console.log(ldh.__proto__.__proto__);
        console.log(ldh.__proto__.__proto__.__proto__);
    </script>
</body>
</html>